// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.common.mybatis.handlers.SysFileListTypeHandler;
import com.fowo.api.sys.entity.*;
import com.fowo.api.sys.entity.SysFile;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * StockInFinishedProduct
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "stock_in", autoResultMap = true)
@Schema(title = "成品入库单")
public class StockInFinishedProduct implements Serializable {

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 入库单号
   */
  @TableField(value = "`order_sn`")
  @Schema(title = "入库单号")
  private String orderSn;

  /**
   * 入库仓库
   */
  @TableField(value = "`warehouse`")
  @JoinField(Warehouse.class)
  @Schema(title = "入库仓库")
  private Long warehouse;

  /**
   * 入库类型
   */
  @TableField(value = "`receipt_type`")
  @Schema(title = "入库类型")
  private String receiptType;

  /**
   * 总入库量
   */
  @TableField(value = "`total_storage`")
  @Schema(title = "总入库量")
  private Integer totalStorage;

  /**
   * 收货单号
   */
  @TableField(value = "`associated_po`")
  @Schema(title = "收货单号")
  private String associatedPo;

  /**
   * 备注
   */
  @TableField(value = "`remarks`")
  @Schema(title = "备注")
  private String remarks;

  /**
   * 供应商
   */
  @TableField(value = "`supplier`")
  @JoinField(Supplier.class)
  @Schema(title = "供应商")
  private Long supplier;

  /**
   * 运费
   */
  @TableField(value = "`freight`")
  @Schema(title = "运费")
  private java.math.BigDecimal freight;

  /**
   * 其他费用
   */
  @TableField(value = "`other_expenses`")
  @Schema(title = "其他费用")
  private java.math.BigDecimal otherExpenses;

  /**
   * 费用分配方式 (1 - 不分配; 2 - 按金额; 3 - 按数量; 4 - 自定义; )
   */
  @TableField(value = "`cost_allocation_type`")
  @Schema(title = "费用分配方式")
  private String costAllocationType;

  /**
   * 入库日期
   */
  @TableField(value = "`warehousing_date`")
  @Schema(title = "入库日期")
  private java.util.Date warehousingDate;

  /**
   * 金额
   */
  @TableField(value = "`total_amount`")
  @Schema(title = "金额")
  private String totalAmount;

  /**
   * 数量
   */
  @TableField(value = "`total_num`")
  @Schema(title = "数量")
  private String totalNum;

  /**
   * 部门
   */
  @TableField(value = "`application_dep`")
  @JoinField(SysDepartment.class)
  @Schema(title = "部门")
  private Long applicationDep;

  /**
   * 产品类型 (0 - 原材料; 1 - 成品; )
   */
  @TableField(value = "`product_type`")
  @Schema(title = "产品类型")
  private String productType;

  /**
   * 采购员
   */
  @TableField(value = "`cg_realname`")
  @Schema(title = "采购员")
  private String cgRealname;

  /**
   * 生成应付 (0 - 未生成; 1 - 已生成; )
   */
  @TableField(value = "`generate_ap`")
  @Schema(title = "生成应付")
  private String generateAp;

  /**
   * 申请部门
   */
  @TableField(value = "`application_dep_name1`")
  @Schema(title = "申请部门")
  private String applicationDepName1;

  /**
   * wid
   */
  @TableField(value = "`wid`")
  @Schema(title = "wid")
  private String wid;

  /**
   * 采购员id
   */
  @TableField(value = "`cg_uid`")
  @JoinField(SysUser.class)
  @Schema(title = "采购员id")
  private Long cgUid;

  /**
   * 采购组织
   */
  @TableField(value = "`purchasing_org`")
  @JoinField(DbOrganization.class)
  @Schema(title = "采购组织")
  private Long purchasingOrg;

  /**
   * 结算组织
   */
  @TableField(value = "`need_org`")
  @JoinField(DbOrganization.class)
  @Schema(title = "结算组织")
  private Long needOrg;

  /**
   * 驳回原因
   */
  @TableField(value = "`reject_remark`")
  @Schema(title = "驳回原因")
  private String rejectRemark;

  /**
   * 附件
   */
  @TableField(value = "`enclosure`", typeHandler = SysFileListTypeHandler.class)
  @Schema(title = "附件")
  private List<SysFile> enclosure;

  /**
   * 审批状态
   */
  @TableField(value = "`a_status`")
  @Schema(title = "审批状态")
  private String aStatus;

  /**
   * 单据状态 (2 - 待提交; 0 - 待入库; 1 - 已完成; 3 - 已撤销; )
   */
  @TableField(value = "`status`")
  @Schema(title = "单据状态")
  private String status;

  /**
   * 采购单号
   */
  @TableField(value = "`purchase_order_code`")
  @Schema(title = "采购单号")
  private String purchaseOrderCode;

  /**
   * 目标表ID列
   */
  @TableField(value = "`parent_id`")
  @Schema(title = "目标表ID列")
  private String parentId;

  /**
   * 是否推送领星
   */
  @TableField(value = "`is_push`")
  @Schema(title = "是否推送领星")
  private Boolean isPush;

  /**
   * 添加类型
   */
  @TableField(value = "`add_type`")
  @Schema(title = "添加类型")
  private String addType;

  /**
   * 已驳回 (0 - 未打回; 1 - 已打回; )
   */
  @TableField(value = "`revocation`")
  @Schema(title = "已驳回")
  private String revocation;
}
